package com.hsp.demo_10.myabstract.costtime;

public abstract class Father {

    /**
     * 统计批处理所花费的时间
     * @return  毫秒
     */
    public long costTime(){
        long start = System.currentTimeMillis();
        job();
        long end = System.currentTimeMillis();
        return end - start;
    }

    public abstract void job();
}
